{% if include.params.article %}
{% assign article = include.params.article %}
{% endif %}

{% if include.params.lang %}
{% assign lang = include.params.lang %}
{% else %}
{% assign lang = lang | default: site.lang | default: "en" %}
{% endif %}

{% if include.params.speed %}
{% assign speed = include.params.speed %}
{% else %}
{% assign speed = 160 %}
{% endif %}

{%- include functions.html func='get_article_words' -%}
{% assign words = return %}

{% assign total_mins = words
| divided_by: speed
| at_least: 1 %}

{% assign hours = total_mins | divided_by: 60 %}
{% assign mins = total_mins | modulo: 60 %}

{% assign return = "约" %}

{% if hours > 0 %}
{% assign unit = "小时" %}
{% if hours > 1 %}
{% assign unit = unit | append: "多" %}
{% endif %}
{% assign return = return
| append: " "
| append: hours
| append: " "
| append: unit %}
{% endif %}

{% assign unit = "分钟" %}
{% if mins > 1 %}
{% assign unit = unit | append: "多" %}
{% endif %}
{% assign return = return
| append: " "
| append: mins
| append: " "
| append: unit %}